<?php
declare(strict_types=1);

use Phinx\Db\Adapter\MysqlAdapter;
use Phinx\Migration\AbstractMigration;

final class AddColumnDealStatusInTaskTable extends AbstractMigration
{
    public function up()
    {
        $this->table('task')
            ->addColumn('deal_status', 'enum', ['values' => 'no_submit,to_submit,submitted,pending,processing,processed', 'default' => 'no_submit', 'null' => false, 'comment' => '处理状态'])
            ->addColumn('clock_status', 'enum', ['values' => 'to_set,no_set', 'default' => 'no_set', 'null' => false, 'comment' => '审核提醒提醒时间状态 (to_set以设置,no_set未设置)'])
            ->save();
    }

    public function down()
    {
        $this->table('task')
            ->removeColumn('deal_status')
            ->removeColumn('clock_status')
            ->save();
    }
}
